<?php
include_once 'prepend.inc.php';
$rcnt = 0;
?>
<body onload="document.getElementById('toolContent <?php _p($_ITEM->Asin); ?>').style.visibility='hidden'">
			<?php
				if($_ITEM->ImageURL <> '')
				{
					$img = $_ITEM->ImageURL;
				}
				else
				{
					$img = '../assets/images/48x48/help.png';
				}
			?> 
			<a href=<?php _p($_ITEM->DetailPageURL); ?>>
					<img src='<?php _p($img);?>' 
					  width=108px 
					  height=160px
					  onmouseover="document.getElementById('toolContent <?php _p($_ITEM->Asin); ?>').style.visibility='visible'"
					  onmouseout="document.getElementById('toolContent <?php _p($_ITEM->Asin); ?>').style.visibility='hidden'" 
					  />
			</a>
				<?php 
					$item_pass = $_ITEM->Id . '~' . $_ITEM->Title;
					$btnChoose = new QLinkButton($this->dtrAssets);
					$btnChoose->Text = 'Add to Basket';
					$btnChoose->AddAction(new QClickEvent(),new QServerAction('ChooseAssets_Click'));
					$btnChoose->ActionParameter  = $item_pass;
				?>
				<?php 
				$btnChoose->Render();
			?>


	
		
			<div  id="toolContent <?php _p($_ITEM->Asin); ?>" style="visibility:hidden;align:absbottom;height:11;width:11;background-color: grey;left:1px;top:11px;display:block;margin 0 2px 0 10px;">
				<div><a href=<?php _p($_ITEM->DetailPageURL); ?>><?php _p($_ITEM->Title);?></a>
				</div>
				<?php if($_ITEM->ProductGroup == "Book") { //Book template begins here ?>
				<div>ASIN: <?php _p($_ITEM->Asin);?></div>
				<div><?php _p($_ITEM->Author); ?></div>
				<div><?php _p($_ITEM->NumberOfPages);?> Pages</div>
				<div>Published By: <?php if($_ITEM->Publisher <> '')
				{
					_p($_ITEM->Publisher);
				}
				else
				{
					_p('Unavailable');
				}
		
		
		
				//Movies template begins here
				}
				elseif($_ITEM->ProductGroup == "DVD")
				{ ?>
				<div>ASIN: <?php isset($_ITEM->Asin)?_p($_ITEM->Asin):_p('');?></div>
				<div>Cast: <?php $strActor = '';if(isset($_ITEM->Actor)) _p($_ITEM->Actor);?></div>
				<div>Director: <?php $strDirector = '';if(isset($_ITEM->Director)) $strDirector =$_ITEM->Director; _p($_ITEM->Director);?>
				</div>
				<div>Movie Time: <?php $strRunningTime = '';if(isset($_ITEM->RunningTime)) _p($_ITEM->RunningTime);?>
				minutes</div>
				<?php }
				elseif($_ITEM->ProductGroup == "Music")
				{?>
				<div>ASIN: <?php isset($_ITEM->Asin)?_p($_ITEM->Asin):_p('');?></div>
				<div>Artist: <?php $strArtist = '';if(isset($_ITEM->Artist)){if(is_array($_ITEM->Artist)){foreach($_ITEM->Artist as $val){$strArtist  =  $strArtist . ',' . $val ;}}else{$strArtist = $_ITEM->Artist;}}?></div>
				<div>Label: <?php isset($_ITEM->Label)?_p($_ITEM->Label):_p('');?></div>
				<div>Number of Discs: <?php isset($_ITEM->NumberOfDiscs)?_p($_ITEM->NumberOfDiscs):_p('');?>
				</div>
				<?php } ?>
			</div>
		</div>

</body>
